﻿<?php
include_once("../function.php");
extract($_GET);//$type $pid
if($type==2)
{
	$pid=trim($pid);
	$pid=explode(",",$pid);
	foreach($pid as $v)
	{
		$sql="delete from ts_cart where pid='$v'";
		$res=mysqli_query($link,$sql);
	}
$pid=implode(",",$pid);
}
$sql="update ts_order set pay_status=1 where order_id=$oid";
	$res=mysqli_query($link,$sql);
	if($res)
	{
		if(mysqli_affected_rows($link)>0)
		{
			msg("支付成功,查看订单","./user_order.php?uid=$uid&oid=$oid&pid=$pid");exit;	
		}
	}
?>